package com.butnet.myframe.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Util {
	public static final String YEAR = "yyyy";
	public static final String MONTH = "MM";
	public static final String DAY = "dd";
	public static final String HOUR = "hh";
	public static final String MINUTE = "mm";
	public static final String SECOND = "ss";
	public static final String Y_M_D_Format = "yyyy-MM-dd";
	public static final String Y_M_D_H_M_Format = "yyyy-MM-dd hh:mm";
	public static final String Y_M_D_H_M_S_Format = "yyyy-MM-dd hh:mm:ss";

	public static Date parseDate(String dateString, String format) throws ParseException {
		SimpleDateFormat sdf = new SimpleDateFormat(format);
		return sdf.parse(dateString);
	}
}
